//
//  Tool.h
//  ZuLinProject
//
//  Created by 谭明星 on 2021/12/8.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>


@interface Tool : NSObject
+(CGSize)sizeOfStr:(NSString *)str andFont:(UIFont *)font andMaxSize:(CGSize)size andLineBreakMode:(NSLineBreakMode)mode;

+(UIImage*)changeSizeOfImgKeepScale:(UIImage*)sourceImg andMaxLength:(NSInteger)maxWidth andMaxHeight:(NSInteger)maxheight;

+(UIImage*)changeSizeOfImg:(UIImage*)sourceImg andWidth:(NSInteger)width andHeight:(NSInteger)height;

+(NSString*) urlEncodingToUTF8:(NSString*) sourceUrl;

+(void) showAlert:(NSString*) message;

+(void) showAlertWithTitle:(NSString *)title message:(NSString*) message;

+(NSString *) deviceIPAdress;

+(UIColor*) UIColorFromRGB:(NSUInteger)rgbValue;

+(UIColor*) colorWithHexString:(NSString*) color;

+(NSString *)getBundlePathWithFileName:(NSString *)fileName;

+(NSArray*) getStringRange:(NSString*) string regEx:(NSString*) regEx range:(NSRange) range;

+(NSString *)notRounding:(float)price afterPoint:(int)position;

// 弹框提示
+ (void)showAlertTitle:(NSString *)title msg:(NSString *)msg cancelTitle:(NSString *)cancelTitle commitBtnTitle:(NSString *)commitText cancelHandlerBlock:(void(^)(void))cancelHandel commitHandlerBlock:(void (^)(void))Commithandler onVC:(UIViewController *)vc;
/**
 * 底部弹框提示
 * 两个弹框 one/two
 */
+ (void)showSheetTitle:(NSString *)title
                   msg:(NSString *)msg
           cancelTitle:(NSString *)cancelTitle
           oneBtnTitle:(NSString *)oneText
           twoBtnTitle:(NSString *)twoText
    cancelHandlerBlock:(void(^)(void))cancelHandel
       oneHandlerBlock:(void (^)(void))oneHandler
       twoHandlerBlock:(void (^)(void))twoHandler
               onVC:(UIViewController *)vc;
/**
 * 底部弹框提示
 * 三个弹框 one/two/three
 */
+ (void)showSheetTitle:(NSString *)title
                   msg:(NSString *)msg
           cancelTitle:(NSString *)cancelTitle
           oneBtnTitle:(NSString *)oneText
           twoBtnTitle:(NSString *)twoText
           threeBtnTitle:(NSString *)threeText
    cancelHandlerBlock:(void (^)(void))cancelHandel
       oneHandlerBlock:(void (^)(void))oneHandler
       twoHandlerBlock:(void (^)(void))twoHandler
       threeHandlerBlock:(void (^)(void))threeHandler
                  onVC:(UIViewController *)vc;

+ (void)showSheetTitle:(NSString *)title msg:(NSString *)msg cancelTitle:(NSString *)cancelTitle commitBtnTitle:(NSString *)commitText otherBtnTitle:(NSString *)otherTitle cancelHandlerBlock:(void(^)(void))cancelHandel commitHandlerBlock:(void (^)(void))Commithandler otherHandlerBlock:(void(^)(void))otherHandler onVC:(UIViewController *)vc;
/**存储自定义对象*/
+(void)setCoustomObject:(id)object withKey:(NSString *)key;
/**获取自定义对象*/
+(id)getCoustomObjectWithKey:(NSString *)key;
/**根据字典返回的数据找到对应的值*/
+(NSString *)getId:(NSString *)Id DicDataWithKey:(NSString *)key;
/**获取周/月*/
+ (NSString *)toolWithHireMode:(NSString *)hireMode;
/**获取归属*/
+ (NSString *)toolWithAscription:(NSString *)ascription;
/**获取租期*/
+ (NSString *)toolWithHireTimeType:(NSInteger )hireTimeType;
/**
 转换万元
 */
+ (NSString *)toolWithConversion_W:(NSString *)str;
/**
 格式化金额

 * 11111
 * NSNumberFormatterNoStyle = kCFNumberFormatterNoStyle,

 * 11,111.11
 * NSNumberFormatterDecimalStyle = kCFNumberFormatterDecimalStyle,

 * ￥11,111.11
 * NSNumberFormatterCurrencyStyle = kCFNumberFormatterCurrencyStyle,

 * 1,111,11%
 * NSNumberFormatterPercentStyle = kCFNumberFormatterPercentStyle,

 * 1.1E1
 * NSNumberFormatterScientificStyle = kCFNumberFormatterScientificStyle,

 * 一万一千一百一十一点一一
 * NSNumberFormatterSpellOutStyle = kCFNumberFormatterSpellOutStyle

 
 */
+ (NSString *)stringChangeMoneyWithStr:(NSString *)vaule;
@end

